<template>
  <div>pinia演示2</div>
  <div>count: {{ count }}</div>
  <div>

  </div>
  <div>
    <el-button @click="increment">增加</el-button>
    <el-button @click="router.push('/study/pina2')">演示2</el-button>
  </div>
  <hr>
  <!-- <PiniaComp></PiniaComp> -->
</template>
<script setup>
import { ref } from 'vue';
import demostore from '../../store/demo';
import { storeToRefs } from 'pinia';
import { useRouter } from 'vue-router';
const router = useRouter();


// import PiniaComp from '../../commponents/piniaComp.vue';

const { count} = storeToRefs(demostore());
const { increment } = demostore();

</script>

<style scoped></style>